import { IsEmail } from "class-validator";
import { BaseDto, BaseListResponseDto, BasePageResponseDto, BaseSingleResponseDto } from "./BaseDto";
import { RoleDto } from "./RoleDto";

export class CreateUserDto {
  @IsEmail()
  public email!: string;
  public password!: string;
  public username!: string;
  public firstName?: string;
  public lastName?: string;
  public roleIds?: number[];
}

export class UpdateUserDto extends CreateUserDto {
  public id!: number;
}

export class UserDto extends BaseDto {
  public email!: string;
  public username!: string;
  public firstName?: string;
  public lastName?: string;
  public roles?: RoleDto[];
}
